package com.guang.springbootrequestversion.controller;

import com.guang.springbootrequestversion.config.MyCard;
import com.guang.springbootrequestversion.config.MyDog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liguang
 * @date 2022/5/10 9:44
 */
@RestController
@RequestMapping(path = "hello")
public class HelloController {

    @Autowired
    MyCard myCard;

    @Autowired
    MyDog myDog;

    @RequestMapping(path = "one")
    public MyCard one(){
        System.out.println("hello,world" +  myCard);
        return myCard;
    }

    @RequestMapping(path = "two")
    public MyDog two(){
        System.out.println("hello,world" +myDog);
        return myDog;
    }
}
